home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
001-025
/
disk_015
/
okidatadump
/
dospecial.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
2KB
|
56 lines
/* Okidata ML 92 special commands */
#include "exec/types.h"
#include "devices/printer.h"
#include "devices/prtbase.h"
extern struct PrinterData *PD ;
DoSpecial(command,OutputBuffer,vline,currentVMI,crlfFlag,Parms)
UWORD *command ; /* command number as defined in printer.h */
char OutputBuffer[] ; /* buffer into which to return converted command */
BYTE *vline ; /* value of the current line position */
BYTE *currentVMI ; /* value of the current line spacing */
BYTE *crlfFlag ; /* setting of the add <lf> after <cr> flag */
UBYTE Parms[] ; /* parameters that came with ANSI command */
{
int i, x = 0 ;
static char
initTabs[]="\033\011008,016,024,032,040,048,056,064,072\n" ;
static char
initPrinter[]="\0331\0336" ;
if (*command == aRIN ) {
/* initialize output buffer */
for (i=0; i < 4; i++)
OutputBuffer[x++] = initPrinter[i] ;
/* get preferences settings */
if ( (PD->pd_Preferences.PrintQuality) == DRAFT )
OutputBuffer[1] = '0' ;
*currentVMI = 36 ; /* initially 1/6" line spacing */
if ( (PD->pd_Preferences.PrintSpacing) == EIGHT_LPI ) {
OutputBuffer[3] = '8' ;
*currentVMI = 27 ;
}
if ( (PD->pd_Preferences.PrintPitch) == ELITE )
OutputBuffer[x++] = '\034' ;
else if ( (PD->pd_Preferences.PrintPitch) == FINE )
OutputBuffer[x++] = '\035' ;
/* what else? */
*command = aTBSALL ;
}
if (*command == aTBSALL) {
for (i=0; i < 38; i++ )
OutputBuffer[x++] = initTabs[i] ;
return(x) ;
}
/* other special functions? -> later italics in downloadable character set */
return(0) ;
}